﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Thanhlichtek.BOS.Ongage
{
    public class Contact
    {
        public String email = "";
        public String list_id = "";
        public Fields fields = new Fields();
        public class Fields
        {
            public String email = "";
            public String address = "";
            public String first_name = "";
            public String last_name = "";
            public String gender = "";
            public String ip = "";
            public String language = "";
            public String phone = "";
            public String os = "";
            public String product_id = "";
            public String title = "";
            public String company = "";
            public String state = "";
            public String zipcode= "";
            public String owner = "";
            public String bullhorn_id = "";
            
        }

        public bool Equals(Contact contact2)
        {
            if (this.email != contact2.email)
            {
                return false;
            }
            else if (this.fields.first_name != contact2.fields.first_name)
            {
                return false;
            }
            else if(this.fields.last_name != contact2.fields.last_name)
            {
                return false;
            }
            else if (this.fields.title != contact2.fields.title)
            {
                return false;
            }
            else if (this.fields.company != contact2.fields.company)
            {
                return false;
            }
            else if (this.fields.state != contact2.fields.state)
            {
                return false;
            }
            else if (this.fields.zipcode != contact2.fields.zipcode)
            {
                return false;
            }
            else if (this.fields.owner != contact2.fields.owner)
            {
                return false;
            }

            return true;
        }
    }

    public class ContactLookupResult
    {
        public String email { get; set; }
        public String id { get; set; }
        public String first_name { get; set; }
        public String last_name { get; set; }
        public String status { get; set; }
        public String bullhorn_id { get; set; }
        public bool IsOptOut()
        {
            if (status.ToLower().Equals("active"))
            {
                return false;
            }
            else
            {
                return true;
            }
            {

            }
        }
    }
}
